import request from "../../../utils/request";
export const service = () => {
  return !!JSON.parse(localStorage.$loginInfo).tenantId ? "/event" : "/ttevent";
};

/**
 * 获取告警信息
 * @param query
 * @returns {*}
 */
export function findOrderAlarm(query) {
  return request({
    url: service() + "/alarm/type/findOrderAlarm",
    method: "post",
    data: query,
  });
}

/**
 * 获取枚举信息
 * @param query
 * @returns {*}
 */
export function getEnumInfo(query) {
  return request({
    url: "/admin/base/system/dict/data/dictType/" + query.enumTypeId,
    method: "get",
  });
}

/**
 * 获取告警事件信息
 * @param params
 * @returns {*}
 */
export function getOrderInfo(params) {
  return request({
    url: service() + "/alarm/order/operate/getOrderInfo",
    method: "post",
    data: params,
  });
}

/**
 * 检查告警信息
 * @param query
 * @returns {*}
 */
export function checkAlarmOrder(query) {
  return request({
    url: service() + "/alarm/order/operate/checkAlarmOrder",
    method: "post",
    data: query,
  });
}

/**
 * 批量研判处理告警事件
 * @param query
 * @returns {*}
 */
export function operateBatchJudgeWarningOrder(query) {
  return request({
    url: service() + "/alarm/order/operate/operateBatchJudgeWarningOrder",
    method: "post",
    data: query,
  });
}

/**
 * 本地检查告警信息
 * @param query
 * @returns {*}
 */
export function localCheckAlarmOrder(query) {
  return request({
    url: service() + "/alarm/order/operate/localCheckAlarmOrder",
    method: "post",
    data: query,
  });
}

/**
 * 铁塔处理人列表
 * @param query
 * @returns {*}
 */
export function getJudeUserList(query) {
  return request({
    url: service() + "/alarm/order/operate/getJudeUserList",
    method: "post",
    data: query,
  });
}

/**
 * 获取可重复的订单列表
 * @param query
 * @returns {*}
 */
export function getOrderListForDuplication(query) {
  return request({
    url: service() + "/alarm/order/operate/getOrderListForDuplication",
    method: "post",
    data: query,
  });
}

/**
 * 获取视频实时流地址
 * @param query
 * @returns {*}
 */
export function getVideoRealtimeUrl(query) {
  return request({
    url: "/video/getVideoRealtimeUrl",
    method: "post",
    data: query,
  });
}

/**
 * 模糊查询算法编码列表
 */
export function queryAlgorithmList(data) {
  return request({
    url: "/ttdevice/video/order/queryAlgorithmList",
    method: "post",
    data: data,
  });
}
